home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / s / windowsnt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-04  |  7.3 KB  |  257 lines

  1. /* System description file for Windows NT.
  2.    Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU Emacs.
  5.  
  6. GNU Emacs is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU Emacs is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU Emacs; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Synched up with: FSF 19.29. */
  21.  
  22. /*
  23.  *      Define symbols to identify the version of Unix this is.
  24.  *      Define all the symbols that apply correctly.
  25.  */
  26.  
  27. /* #define UNIPLUS */
  28. /* #define USG5 */
  29. /* #define USG */
  30. /* #define HPUX */
  31. /* #define UMAX */
  32. /* #define BSD4_1 */
  33. /* #define BSD4_2 */
  34. /* #define BSD4_3 */
  35. /* #define BSD */
  36. /* #define VMS */
  37. #ifndef WINDOWSNT
  38. #define WINDOWSNT
  39. #endif
  40. #ifndef DOS_NT
  41. #define DOS_NT     /* MSDOS or WINDOWSNT */
  42. #endif
  43.  
  44. /* If you are compiling with a non-C calling convention but need to
  45.    declare vararg routines differently, put it here */
  46. #define _VARARGS_ __cdecl
  47.  
  48. /* If you are providing a function to something that will call the
  49.    function back (like a signal handler and signal, or main) its calling
  50.    convention must be whatever standard the libraries expect */
  51. #define _CALLBACK_ __cdecl
  52.  
  53. /* SYSTEM_TYPE should indicate the kind of system you are using.
  54.  It sets the Lisp variable system-type.  */
  55.  
  56. #define SYSTEM_TYPE "windows-nt"
  57. #define SYMS_SYSTEM syms_of_ntterm ()
  58.  
  59. #define NO_MATHERR
  60. #define HAVE_FREXP
  61. #define HAVE_FMOD
  62.  
  63. /* NOMULTIPLEJOBS should be defined if your system's shell
  64.  does not have "job control" (the ability to stop a program,
  65.  run some other program, then continue the first one).  */
  66.  
  67. /* #define NOMULTIPLEJOBS */
  68.  
  69. /* Letter to use in finding device name of first pty,
  70.   if system supports pty's.  'a' means it is /dev/ptya0  */
  71.  
  72. #define FIRST_PTY_LETTER 'a'
  73.  
  74. /*
  75.  *      Define HAVE_TIMEVAL if the system supports the BSD style clock values.
  76.  *      Look in <sys/time.h> for a timeval structure.
  77.  */
  78.  
  79. #define HAVE_TIMEVAL
  80. struct timeval 
  81.   {
  82.     long tv_sec;    /* seconds */
  83.     long tv_usec;    /* microseconds */
  84.   };
  85. struct timezone 
  86.   {
  87.     int    tz_minuteswest;    /* minutes west of Greenwich */
  88.     int    tz_dsttime;    /* type of dst correction */
  89.   };
  90.  
  91. void gettimeofday (struct timeval *, struct timezone *);
  92.  
  93.  
  94. /*
  95.  *      Define HAVE_SELECT if the system supports the `select' system call.
  96.  */
  97.  
  98. /* #define HAVE_SELECT */
  99.  
  100. /*
  101.  *      Define HAVE_PTYS if the system supports pty devices.
  102.  */
  103.  
  104. /* #define HAVE_PTYS */
  105.  
  106. /* If your system uses COFF (Common Object File Format) then define the
  107.    preprocessor symbol "COFF". */
  108.  
  109. #define COFF
  110.  
  111. /* define MAIL_USE_FLOCK if the mailer uses flock
  112.    to interlock access to /usr/spool/mail/$USER.
  113.    The alternative is that a lock file named
  114.    /usr/spool/mail/$USER.lock.  */
  115.  
  116. /* #define MAIL_USE_FLOCK */
  117.  
  118. /* If the character used to separate elements of the executable path
  119.    is not ':', #define this to be the appropriate character constant.  */
  120. #define SEPCHAR ';'
  121.  
  122. /* ============================================================ */
  123.  
  124. /* Here, add any special hacks needed
  125.    to make Emacs work on this system.  For example,
  126.    you might define certain system call names that don't
  127.    exist on your system, or that do different things on
  128.    your system and must be used only through an encapsulation
  129.    (Which you should place, by convention, in sysdep.c).  */
  130.  
  131. /* Define this to be the separator between path elements */
  132. #define DIRECTORY_SEP '\\'
  133.  
  134. /* Define this to be the separator between devices and paths */
  135. #define DEVICE_SEP ':'
  136.  
  137. /* We'll support either convention on NT.  */
  138. #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
  139. #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
  140.  
  141. /* The null device on Windows NT. */
  142. #define NULL_DEVICE     "NUL:"
  143. #define EXEC_SUFFIXES   ".exe:.com:.bat:"
  144.  
  145. #ifndef MAXPATHLEN
  146. #define MAXPATHLEN      _MAX_PATH
  147. #endif
  148.  
  149. #define LISP_FLOAT_TYPE
  150.  
  151. #define HAVE_DUP2           1
  152. #define HAVE_RENAME         1
  153. #define HAVE_RMDIR          1
  154. #define HAVE_MKDIR          1
  155. #define HAVE_GETHOSTNAME    1
  156. #define HAVE_RANDOM        1
  157. #define USE_UTIME        1
  158. #define HAVE_MOUSE        1
  159. #define HAVE_TZNAME        1
  160.  
  161. #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
  162.  
  163. /* These have to be defined because our compilers treat __STDC__ as being
  164.    defined (most of them anyway). */
  165.  
  166. #define access  _access
  167. #define chdir   _chdir
  168. #define chmod   _chmod
  169. #define close   _close
  170. #define creat   _creat
  171. #define dup     _dup
  172. #define dup2    _dup2
  173. #define execlp  _execlp
  174. #define execvp  _execvp
  175. #define getpid  _getpid
  176. #define isatty  _isatty
  177. #define link    _link
  178. #define lseek   _lseek
  179. #define mkdir   _mkdir
  180. #define mktemp  _mktemp
  181. #define open    _open
  182. #define pipe    _pipe
  183. #define read    _read
  184. #define rmdir   _rmdir
  185. #define sleep   nt_sleep
  186. #define unlink  _unlink
  187. #define umask    _umask
  188. #define utime    _utime
  189. #define write   _write
  190. #define _longjmp        longjmp
  191. #define spawnve win32_spawnve
  192. #define wait    win32_wait
  193. #define signal  win32_signal
  194. #define ctime    nt_ctime    /* Place a wrapper around ctime (see nt.c).  */
  195.  
  196. /* Defines that we need that aren't in the standard signal.h  */
  197. #define SIGHUP  1               /* Hang up */
  198. #define SIGQUIT 3               /* Quit process */
  199. #define SIGTRAP 5               /* Trace trap */
  200. #define SIGKILL 9               /* Die, die die */
  201. #define SIGPIPE 13              /* Write on pipe with no readers */
  202. #define SIGALRM 14              /* Alarm */
  203. #define SIGCHLD 18              /* Death of child */
  204.  
  205. /* For integration with MSDOS support.  */
  206. #define getdisk()               (_getdrive () - 1)
  207. #define getdefdir(_drv, _buf)   _getdcwd (_drv, _buf, MAXPATHLEN)
  208.  
  209. #define EMACS_CONFIGURATION     get_emacs_configuration ()
  210. #define EMACS_CONFIG_OPTIONS    "NT"    /* Not very meaningful yet.  */
  211.  
  212. /* Define this so that winsock.h definitions don't get included when windows.h
  213.    is...  I don't know if they do the right thing for emacs.  For this to
  214.    have proper effect, config.h must always be included before windows.h.  */
  215. #define _WINSOCKAPI_    1
  216.  
  217. /* Defines size_t and alloca ().  */
  218. #include <malloc.h>
  219.  
  220. /* We have to handle stat specially.  However, #defining stat to
  221.    something else not only redefines uses of the function, but also
  222.    redefines uses of the type struct stat.  What unfortunate parallel
  223.    naming.  */
  224. #include <sys/stat.h>
  225. struct nt_stat 
  226.   {
  227.     struct _stat statbuf;
  228.   };
  229.  
  230. #ifdef stat
  231. #undef stat
  232. #endif
  233. #define stat nt_stat
  234. #define st_dev statbuf.st_dev
  235. #define st_ino statbuf.st_ino
  236. #define st_mode statbuf.st_mode
  237. #define st_nlink statbuf.st_nlink
  238. #define st_uid statbuf.st_uid
  239. #define st_gid statbuf.st_gid
  240. #define st_rdev statbuf.st_rdev
  241. #define st_size statbuf.st_size
  242. #define st_atime statbuf.st_atime
  243. #define st_mtime statbuf.st_mtime
  244. #define st_ctime statbuf.st_ctime
  245.  
  246. /* Define for those source files that do not include enough NT 
  247.    system files.  */
  248. #ifndef NULL
  249. #ifdef __cplusplus
  250. #define NULL    0
  251. #else
  252. #define NULL    ((void *)0)
  253. #endif
  254. #endif
  255.  
  256. /* ============================================================ */
  257.